<script>
function mon(){
    let money = 500
    return function spendMoney(){
    money -= 100
    console.log(money);
}
}
var spendMoney = mon()





function fatherSpendMoney(){
    money -= 50
    console.log(money);
    
}


spendMoney()
spendMoney()
spendMoney()
fatherSpendMoney()
</script>